<?php

class XistsPlan extends BaseXistsPlan
{

  public function hasValidDeposit($deposit)
  {
    if ($deposit >= $this->getLowerAmount()) {
      return true;
    }
    return false;
  }
  
  public function __toString()
  {
    $currency = sfConfig::get('app_currency');
    $upperAmount = "to $currency " . $this->getUpperAmount();
    if ($this->getUpperAmount() < 1) {
      $upperAmount = 'and above';
    }

    return sprintf("%s - %s ($currency %s %s)", $this->getName(), $this->getRefPercentage().'%', $this->getLowerAmount(), $upperAmount);
  }
}
